home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 July / Chip_1998-07_cd.bin / zkuste / mazda / STW311.dxr / Internal_23_SAB BlendButton.ls < prev    next >
Encoding:
Text File  |  1998-05-12  |  1.6 KB  |  58 lines

  1. property my_blend, def_Blend, button_active, whichevent
  2.  
  3. on mouseDown me
  4.   if whichevent = #mouseDown then
  5.     init(me)
  6.   end if
  7. end
  8.  
  9. on mouseUp me
  10.   set the blend of sprite the spriteNum of me to def_Blend
  11.   set the button_active of me to 0
  12. end
  13.  
  14. on mouseEnter me
  15.   if whichevent = #mouseEnter then
  16.     init(me)
  17.   end if
  18. end
  19.  
  20. on mouseLeave me
  21.   if the button_active of me then
  22.     set the blend of sprite the spriteNum of me to def_Blend
  23.   end if
  24. end
  25.  
  26. on mouseUpOutSide me
  27.   set the button_active of me to 0
  28. end
  29.  
  30. on init me
  31.   set the blend of sprite the spriteNum of me to my_blend
  32.   set the button_active of me to 1
  33. end
  34.  
  35. on beginSprite me
  36.   set the button_active of me to 0
  37.   set the def_Blend of me to the blend of sprite the spriteNum of me
  38. end
  39.  
  40. on endSprite me
  41. end
  42.  
  43. on getPropertyDescriptionList
  44.   if the currentSpriteNum = 0 then
  45.     set memdefault to 100
  46.   else
  47.     set memref to the member of sprite the currentSpriteNum
  48.     set castLibNum to the castLibNum of memref
  49.     set memdefault to 100
  50.   end if
  51.   set p_list to [#my_blend: [#comment: "Blend na:", #format: #empty, #default: memdefault], #whichevent: [#comment: "Initializing Event:", #format: #symbol, #range: [#mouseDown, #mouseEnter], #default: #mouseUp]]
  52.   return p_list
  53. end
  54.  
  55. on getBehaviorDescription
  56.   return "Vytv├í├╕├¡ ze spritu tla├¿├¡tko, kter├⌐ je p├╕ed inicalizac├¡ neviditeln├⌐ a po najet├¡ my┼íi nebo stisknut├¡ tl. my┼íi na spritu lze tla├¿├¡tko zviditelnit." & RETURN & "PARAMETERS:" & RETURN & "ΓÇó Hilite Image - Choose the cast member to display when the button is pressed. The default value is the cast member immedietly following the sprite's current cast member."
  57. end
  58.